{extend name="public/home"/}
{block name='css'}
<link rel="stylesheet" href="/static/css/feedback.css">
{/block}
{block name="content"}
  <h1>发送站内信</h1>
  <form action="">
    <div>
      <label for="typeid">意见类型：</label>
      <select name="typeid" id="typeid">
        {:dc2option("DC_MSGTYPE")}
      </select>
    </div>
    <div>
      <label for="content">留言内容：</label>  
      <input type="text" id='content' name='content'>  
    </div>
    <input type="button" value="提交">
  </form>
  
{/block}

{block name='script'}
<script>
      $(function(){
        $('input[type="button"]').on('click', function(){
          var data = $('form').serialize();
          $.ajax({
            url:'{:url("add")}',
            data:data,
            type:'post',
            dataType:'json',
            success:function(info){
              alert('提交成功');
              window.location.reload();
            }
          })
        })
    });
</script>
{/block}
